#include<stdio.h>
#include<time.h>
#include<unistd.h>
#include<stdlib.h>
#include"process.h"
const double totol = 101;
const int base = 10;
const double once = 0.1;
typedef void(*f)(double x1 , double x2);
void func(f FC)
{
  double current = 0;
  srand(time(NULL));
  while(current < totol)
  {
    int Rand = (rand()%base) + 1;
    double speed = Rand * once;
    FC(current,totol);
    current += speed;
    fflush(stdout);
    if(current >= totol)
    {
      current = totol;
      FC(current,totol);
    }
  }
}
int main()
{
  func(process);
  printf("\r\n");
  return 0;
}
